<!DOCTYPE html>
<html style="background:none;">

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>会员推荐关系图</title>

	
	
	
	 <!-- Bootstrap Core CSS -->
	<link href="__PUBLIC__/Theme2/css/bootstrap.min.css" rel='stylesheet' type='text/css' />
	<!-- Custom CSS -->
	<link href="__PUBLIC__/Theme2/css/style.css" rel='stylesheet' type='text/css' />
	<link href="__PUBLIC__/Theme2/css/font-awesome.css" rel="stylesheet"> 
	<!-- jQuery -->
	<script src="__PUBLIC__/Theme2/js/jquery.min.js"></script>

	<link href="__PUBLIC__/Theme2/css/custom.css" rel="stylesheet">
	<!-- Metis Menu Plugin JavaScript -->
	<script src="__PUBLIC__/Theme2/js/metisMenu.min.js"></script>
	<script src="__PUBLIC__/Theme2/js/custom.js"></script>
	<!-- Graph JavaScript -->
	<script src="__PUBLIC__/Theme2/js/d3.v3.js"></script>
	<script src="__PUBLIC__/Theme2/js/rickshaw.js"></script>
	<!-- Bootstrap Core JavaScript -->
	<script src="__PUBLIC__/Theme2/tree/dtree.css"></script>
	<script src="__PUBLIC__/Theme2/tree/dtree.js"></script>

	
</head>

<body style="background:none;">

        <div class="col-md-12 graphs">
	   <div class="xs">
  	 <h3>会员关系图 </h3>
	 
				<style>
					.grid_box1{        display: block;  float: none; }
					.table-striped td{text-align:center;font-weight:bold;}
					
					.table td, .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{    padding: 15px 2px !important;}
					.table-striped table{width:100%;}
					.table-striped td{border:1px solid red;}
					.panel-content{clear:both;text-align:center;}
					.panel-content a{color:#ef553a;}
				
				</style>
	 
    <div class="panel panel-warning" data-widget="{&quot;draggable&quot;: &quot;false&quot;}" data-widget-static="">
				
                <form method="post" action="__APP__/User/relation" class="form-horizontal" id="form-admin-add" enctype="multipart/form-data">
					<div class="col-md-3 grid_box1">
						 <input type="text" name="search_loginname" id="search_loginname" class="form-control1 search_loginname" placeholder="用户编号"/>
						 <button class="btn-success btn">搜索</button>&nbsp;
						 <a href="__APP__/User/Affectlists" class="btn-success btn">全部</a>
					</div>
				</form>
				
				<div class="panel-body no-padding">
				<div class="panel-content">
				
				<div class="dtree col-md-3 grid_box1" >

				<p style="padding:5px 0;"><a href="javascript: d.openAll();">展开全部</a> | <a href="javascript: d.closeAll();">关闭全部</a>
					
				</p>

				<script type="text/javascript">
					d = new dTree('d');

					<?php

						function getcatelog($tarray){
							foreach($tarray as $k=>$v){
								if($v['name']!=$top_info['loginname'])
								{
									echo "d.add('".$v['name']."','".$v['rid']."','".$v['name']."(".$v['level'].")"."(".$v['childrencount'].") ','','','','__PUBLIC__/Theme2/ico/index/dwuser.gif','__PUBLIC__/Theme2/ico/index/dwuser.gif');";
								}
								getcatelog($v['children']);
							}
						}
					?>

					d.add('<?php echo $top_info['loginname']?>',-1,'<?php echo $top_info['loginname']."(".$top_info['level'].")"."({$top_info[childrencount]})"?>','','','','images/dwuser.gif');

					<?php
						getcatelog($a_lists);

					?>

					document.write(d);

					d.closeAll();
				</script>
				</div>
				</div>
				
				</div>
	</div>
	
   
	
  </div>
  <div class="copy_layout">
      <p>
	  </p>
  </div>
   </div>
   
    
</body>

</html>
